//
//  UIButton+ImagePosition.h
//  CHSimpleUI
//
//  Created by CY on 2025/2/5.
//

#import <UIKit/UIKit.h>


typedef NS_ENUM(NSInteger, BUTTON_IMAGE_LOCAL_TYPE) {
    BUTTON_IMAGE_LOCAL_TYPE_LEFT = 0,   // 左边
    BUTTON_IMAGE_LOCAL_TYPE_RIGHT = 1,  // 右边
    BUTTON_IMAGE_LOCAL_TYPE_TOP = 2,    // 上方
    BUTTON_IMAGE_LOCAL_TYPE_BOTTOM = 3  // 下方
};

@interface UIButton (ImagePosition)

/**
 设置按钮图片和文字的相对位置

 @param local 图片位置 (左、右、上、下)
 @param margin 图片和文字的间距
 */
- (void)setImagePosition:(BUTTON_IMAGE_LOCAL_TYPE)local margin:(CGFloat)margin;

@end

